import os

os.environ["OPENAI_API_KEY"] = "sess-qCX1fF30AgyeRtGPXivJSiOjDBoTno5CksuRwhst"
os.environ["SERPAPI_API_KEY"] = "2c8e1d0d6913f91eabf314159ab3ec5153bbf9e1624e9f02426874c1ba116c9c"

from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.agents import AgentType
from langchain.llms import OpenAI

llm = OpenAI(temperature=0.9)
tools = load_tools(["serpapi","llm-math"],llm=llm)
agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
agent.run("What was the high temperature is SF yesterday in Fahrenheit? What is that number raised to the .023 power?")
# agent.run("昨天广州的最高气温是多少？")
